<div class="modal-header" xmlns="http://www.w3.org/1999/html">
    <button aria-hidden="true" data-dismiss="modal" class="close" type="button">&times;</button>
    <h4 class="modal-title">Replicar Conta a Receber</h4>
</div>
<form action="" name="PayReceive" id="form-ContasReceberParcelamento" onsubmit="savePayReceive();return false;">
    <div class="modal-body">

        <div class="row mb5">
            <div class="col-sm-6">
                <label class="control-label text-muted">Data Vencimento:</label>
                <span class="form-control-feedback text-bold"><?php echo $dados['PayReceive']['data_vencimento'] ?></span>
            </div>
            <div class="col-sm-4">
                <label class="control-label text-muted">Valor a Repetir:</label>
                <span class="form-control-feedback text-bold"><?php echo $dados['PayReceive']['valor_doc'] ?></span>
            </div>
            <div class="col-sm-2">
                <div class="ckbox ckbox-success">
                    <input type="checkbox" name="data[PayReceive][e_replica]" value="1" id="sa-input-ContaReceber-cE_replica"/>
                    <label class="control-label text-bold" for="sa-input-ContaReceber-cE_replica">É uma replica</label>
                </div>
            </div>
        </div>
        <div class="row mb5" id="box-parcelamento">
            <div class="col-sm-9">
                <label class="control-label text-bold">Frequência:</label>
                <div class="control-group">
                    <?php
                        echo $this->Form->input('frequencia', array(
                            'before' => '<div class="rdio rdio-danger col-sm-3">',
                            'after' => '</div>',
                            'between' => '--between---',
                            'separator' => '</div><div class="rdio rdio-success col-sm-3">',
                            'options' => array(1=>'Mensal',3=>'Trimestral',6=>'Semestral',12=>'Anual'),
                            'value'=>1,
                            'type'=>'radio',
                            'div'=>false,
                            'legend'=>false,
                            'name'=>'data[PayReceive][frequencia]'
                        ));
                    ?>
                </div>
            </div>
            <div class="col-sm-3">
                <label class="control-label text-bold">Nº Replicas:</label>
                <div class="input-group ">
                    <input type="number" min="1" name="data[PayReceive][nparcelas]" id="" class="form-control input-sm nomargin"  />
                    <span class="input-group-btn">
                    <button type="button" onclick="gerarReplicar()" class="btn btn-default btn-sm" data-toggle="tooltip" title="Gerar Parcelas" data-original-title="Novo Grupo"><i class="fa fa-gear"></i></button>
                  </span>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-md-12 hide" id="sa-box-viewParcelas">
                <div class="table-responsive">
                    <table class="table noborder nomargin">
                        <thead>
                        <tr>
                            <th class="col-md-6">Vencimento</th>
                            <th class="col-md-6">Valor</th>
                        </tr>
                        </thead>
                    </table>
                    <div class="overflow-y">
                        <table class="table" id="sa-table-listParcelas">
                            <tbody>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="modal-footer nomargin">
        <button type="submit" class="btn btn-primary btn-sm" id="sa-btn-bProcesssar" data-toggle="tooltip" title="" data-original-title="Novo Grupo">Ok & Salvar Tudo</button>
        <button type="button" class="btn btn-default btn-sm"  onclick="modalClose('tela2');" data-toggle="tooltip" title="" data-original-title="Novo Grupo">Ok & Voltar</button>
    </div>
</form>